<%@ page language="java" pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">

    <title>数据库性能测试系统</title>
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
    <script src="plugins/seajs/sea.js" id="seajsnode" type="text/javascript"></script>
    <script src="plugins/seajs/config.js" type="text/javascript"></script>
    <script type="text/javascript">
        seajs.use("./dbtest", function (dbtest) {
            dbtest.init();
        });
    </script>

    <style type="text/css">

        .sinput td input {
            width: 150px;
        }

        .linput td input {
            width: 390px;
        }

        .result table tr td {
            width: 150px;
        }

    </style>

</head>

<body>
<div style="margin: 0 auto;width: 1000px;">
    <h1 style="text-align: center;">性能测试系统</h1>
    <form action="db.do?method=addDB" method="post" enctype="multipart/form-data">
        <table>
            <tr class="sinput">
                <td>名称：</td>
                <td><input type="text" name="dbName"></td>
            </tr>
            <tr class="linput">
                <td>数据库地址：</td>
                <td colspan="3"><input type="text" name="dbUrl"></td>
            </tr>
            <tr class="linput">
                <td>数据库驱动：</td>
                <td colspan="3"><input type="text" name="dbDriver"></td>
            </tr>
            <tr class="sinput">
                <td>用户名：</td>
                <td><input type="text" name="dbUsername"></td>
                <td>密码：</td>
                <td><input type="password" name="dbPassword"></td>
            </tr>
            <tr class="sinput">
                <td>建库脚本：</td>
                <td><input type="file" name="dbScript"></td>
            </tr>
            <tr class="linput">
                <td>插入数据脚本：</td>
                <td colspan="3"><input type="text" name="insertSql"></td>
            </tr>
            <tr>
                <td></td>
                <td><input type="submit" value="建库"></td>
            </tr>
        </table>
    </form>

    <table>
    </table>

    <table>
        <tr class="sinput">
            <td>数据量：</td>
            <td><input type="text" name="url"></td>
        </tr>
        <tr class="linput">
            <td>执行脚本：</td>
            <td colspan="3"><input type="text" name="url"></td>
        </tr>
        <tr>
            <td></td>
            <td><a href="javascript:void(0);" class="test">测试</a></td>
        </tr>
    </table>
    <div class="result">
    </div>
</div>
</body>
</html>

